Telegram Group & Telegram Channel
Bottle — это мини-фреймворк для Python, позволяющий писать веб-приложения с высокой скоростью, и он представлен в виде одного файла bottle.py, так что для его работы достаточно только этого файла 💪

Мы все обожаем примеры, поэтому вот код для начала работы с Bottle:
from bottle import route, run, template

@route('/hello/<name>')
def index(name):
return template('<b>Hello {{name}}</b>!', name=name)

run(host='localhost', port=8080)

Здесь мы создали веб сервер по адресу localhost с портом 8080.
Вы можете изменить текст "Hello {{name}}" на любой другой текст.

Чтобы проверить его работу, просто перейдите по ссылке http://localhost:8080/hello/world. После этого вы увидите на экране "Hello World".

Повторюсь, Bottle распространяется в виде одного файла-модуля и не имеет никаких зависимостей, кроме стандартной библиотеки Python.

Ставится командой ⚙️ pip install bottle
Официальная документация только на английском
Русская документация



tg-me.com/pythonturboru/628
Create:
Last Update:

Bottle — это мини-фреймворк для Python, позволяющий писать веб-приложения с высокой скоростью, и он представлен в виде одного файла bottle.py, так что для его работы достаточно только этого файла 💪

Мы все обожаем примеры, поэтому вот код для начала работы с Bottle:

from bottle import route, run, template

@route('/hello/<name>')
def index(name):
return template('<b>Hello {{name}}</b>!', name=name)

run(host='localhost', port=8080)

Здесь мы создали веб сервер по адресу localhost с портом 8080.
Вы можете изменить текст "Hello {{name}}" на любой другой текст.

Чтобы проверить его работу, просто перейдите по ссылке http://localhost:8080/hello/world. После этого вы увидите на экране "Hello World".

Повторюсь, Bottle распространяется в виде одного файла-модуля и не имеет никаких зависимостей, кроме стандартной библиотеки Python.

Ставится командой ⚙️ pip install bottle
Официальная документация только на английском
Русская документация

BY Python Turbo. Уютное сообщество Python разработчиков.




Share with your friend now:
tg-me.com/pythonturboru/628

View MORE
Open in Telegram


Python Turbo Уютное сообщество Python разработчиков Telegram | DID YOU KNOW?

Date: |

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.

Tata Power whose core business is to generate, transmit and distribute electricity has made no money to investors in the last one decade. That is a big blunder considering it is one of the largest power generation companies in the country. One of the reasons is the company's huge debt levels which stood at ₹43,559 crore at the end of March 2021 compared to the company’s market capitalisation of ₹44,447 crore.

Python Turbo Уютное сообщество Python разработчиков from fr


Telegram Python Turbo. Уютное сообщество Python разработчиков.
FROM USA